Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2)  * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <linux/capability.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #include <linux/fs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include <linux/mount.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include "reiserfs.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/time.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/uaccess.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/pagemap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/compat.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * reiserfs_ioctl - handler for ioctl for inode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  * supported commands:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  *  1) REISERFS_IOC_UNPACK - try to unpack tail from direct item into indirect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  *                           and prevent packing file (argument arg has t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  *			      be non-zero)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  *  2) REISERFS_IOC_[GS]ETFLAGS, REISERFS_IOC_[GS]ETVERSION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  *  3) That's all for a while ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	struct inode *inode = file_inode(filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	unsigned int flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	int err = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	reiserfs_write_lock(inode->i_sb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	switch (cmd) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	case REISERFS_IOC_UNPACK:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 		if (S_ISREG(inode->i_mode)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 			if (arg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 				err = reiserfs_unpack(inode, filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		} else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 			err = -ENOTTY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 		 * following two cases are taken from fs/ext2/ioctl.c by Remy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		 * Card (card@masi.ibp.fr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	case REISERFS_IOC_GETFLAGS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		if (!reiserfs_attrs(inode->i_sb)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 			err = -ENOTTY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		flags = REISERFS_I(inode)->i_attrs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		err = put_user(flags, (int __user *)arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	case REISERFS_IOC_SETFLAGS:{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 			if (!reiserfs_attrs(inode->i_sb)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 				err = -ENOTTY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 				break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 			err = mnt_want_write_file(filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 			if (err)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 				break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 			if (!inode_owner_or_capable(inode)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 				err = -EPERM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 				goto setflags_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 			if (get_user(flags, (int __user *)arg)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 				err = -EFAULT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 				goto setflags_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 			/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 			 * Is it quota file? Do not allow user to mess with it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 			 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 			if (IS_NOQUOTA(inode)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 				err = -EPERM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 				goto setflags_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 			err = vfs_ioc_setflags_prepare(inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 						     REISERFS_I(inode)->i_attrs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 						     flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 			if (err)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 				goto setflags_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 			if ((flags & REISERFS_NOTAIL_FL) &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 			    S_ISREG(inode->i_mode)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 				int result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 				result = reiserfs_unpack(inode, filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 				if (result) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 					err = result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 					goto setflags_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 				}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 			}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 			sd_attrs_to_i_attrs(flags, inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 			REISERFS_I(inode)->i_attrs = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 			inode->i_ctime = current_time(inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 			mark_inode_dirty(inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) setflags_out:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 			mnt_drop_write_file(filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	case REISERFS_IOC_GETVERSION:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		err = put_user(inode->i_generation, (int __user *)arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	case REISERFS_IOC_SETVERSION:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		if (!inode_owner_or_capable(inode)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 			err = -EPERM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 		err = mnt_want_write_file(filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		if (err)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		if (get_user(inode->i_generation, (int __user *)arg)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 			err = -EFAULT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 			goto setversion_out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 		inode->i_ctime = current_time(inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		mark_inode_dirty(inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) setversion_out:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		mnt_drop_write_file(filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		err = -ENOTTY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	reiserfs_write_unlock(inode->i_sb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	return err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #ifdef CONFIG_COMPAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) long reiserfs_compat_ioctl(struct file *file, unsigned int cmd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 				unsigned long arg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	 * These are just misnamed, they actually
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	 * get/put from/to user an int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	switch (cmd) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	case REISERFS_IOC32_UNPACK:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		cmd = REISERFS_IOC_UNPACK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	case REISERFS_IOC32_GETFLAGS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		cmd = REISERFS_IOC_GETFLAGS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	case REISERFS_IOC32_SETFLAGS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 		cmd = REISERFS_IOC_SETFLAGS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	case REISERFS_IOC32_GETVERSION:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 		cmd = REISERFS_IOC_GETVERSION;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	case REISERFS_IOC32_SETVERSION:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		cmd = REISERFS_IOC_SETVERSION;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 		return -ENOIOCTLCMD;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	return reiserfs_ioctl(file, cmd, (unsigned long) compat_ptr(arg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) int reiserfs_commit_write(struct file *f, struct page *page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 			  unsigned from, unsigned to);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)  * reiserfs_unpack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)  * Function try to convert tail from direct item into indirect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)  * It set up nopack attribute in the REISERFS_I(inode)->nopack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) int reiserfs_unpack(struct inode *inode, struct file *filp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	int retval = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	int index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	struct page *page;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	struct address_space *mapping;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	unsigned long write_from;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	unsigned long blocksize = inode->i_sb->s_blocksize;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	if (inode->i_size == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		REISERFS_I(inode)->i_flags |= i_nopack_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	/* ioctl already done */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	if (REISERFS_I(inode)->i_flags & i_nopack_mask) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	/* we need to make sure nobody is changing the file size beneath us */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		int depth = reiserfs_write_unlock_nested(inode->i_sb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		inode_lock(inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		reiserfs_write_lock_nested(inode->i_sb, depth);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	reiserfs_write_lock(inode->i_sb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	write_from = inode->i_size & (blocksize - 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	/* if we are on a block boundary, we are already unpacked.  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	if (write_from == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		REISERFS_I(inode)->i_flags |= i_nopack_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	 * we unpack by finding the page with the tail, and calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	 * __reiserfs_write_begin on that page.  This will force a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	 * reiserfs_get_block to unpack the tail for us.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	index = inode->i_size >> PAGE_SHIFT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	mapping = inode->i_mapping;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	page = grab_cache_page(mapping, index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	retval = -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	if (!page) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	retval = __reiserfs_write_begin(page, write_from, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	if (retval)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		goto out_unlock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	/* conversion can change page contents, must flush */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	flush_dcache_page(page);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	retval = reiserfs_commit_write(NULL, page, write_from, write_from);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	REISERFS_I(inode)->i_flags |= i_nopack_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) out_unlock:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	unlock_page(page);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	put_page(page);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) out:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	inode_unlock(inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	reiserfs_write_unlock(inode->i_sb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	return retval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) }