X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fncpfs%2Ffile.c;h=6a7d901f1936e555a530981c6fc6e53bab000f00;hb=2528ce3237be4e900f5eaa455490146e1422e424;hp=d3152f8d95c6221495f014dbd00c15ab285cb58e;hpb=4b85df0419d1fb135d9d845876e8c7ee1393f83c;p=linux-2.6-omap-h63xx.git diff --git a/fs/ncpfs/file.c b/fs/ncpfs/file.c index d3152f8d95c..6a7d901f193 100644 --- a/fs/ncpfs/file.c +++ b/fs/ncpfs/file.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "ncplib_kernel.h" @@ -203,7 +204,6 @@ ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t * if (pos + count > MAX_NON_LFS && !(file->f_flags&O_LARGEFILE)) { if (pos >= MAX_NON_LFS) { - send_sig(SIGXFSZ, current, 0); return -EFBIG; } if (count > MAX_NON_LFS - (u32)pos) { @@ -212,7 +212,6 @@ ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t * } if (pos >= inode->i_sb->s_maxbytes) { if (count || pos > inode->i_sb->s_maxbytes) { - send_sig(SIGXFSZ, current, 0); return -EFBIG; } } @@ -283,9 +282,18 @@ static int ncp_release(struct inode *inode, struct file *file) { return 0; } +static loff_t ncp_remote_llseek(struct file *file, loff_t offset, int origin) +{ + loff_t ret; + lock_kernel(); + ret = generic_file_llseek_unlocked(file, offset, origin); + unlock_kernel(); + return ret; +} + const struct file_operations ncp_file_operations = { - .llseek = remote_llseek, + .llseek = ncp_remote_llseek, .read = ncp_file_read, .write = ncp_file_write, .ioctl = ncp_ioctl,